package com.recipefinder.util;

import java.io.File;
import java.io.FileReader;
import java.io.IOException;

public class FileTools {
	
	public static String readFile(String filePath) throws IOException{
		StringBuffer result = new StringBuffer();
		
		FileReader fr = new FileReader(new File(filePath));
		char[] buffer = new char[256];
		
		int leng = 0;
		while((leng = fr.read(buffer)) != -1){
			result.append(new String(buffer, 0, leng));
		}
		fr.close();
		return result.toString();
	}
}
